<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://www.springframework.org/tags/form"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<jsp:include page="../../set.jsp" />
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<title>重置密码</title>
<jsp:include page="../../cite.jsp" />
<style>
body {
	background: #efefef;
}

.body {
	padding-top: 40px;
}

.body .panel {
	max-width: 600px;
	margin: 0 auto;
}

.body .panel>.panel-body {
	padding: 10px 30px;
}

.body .panel>.panel-body>.page-header {
	margin-top: 10px;
}

.body .panel>.panel-body>.page-header>h4 {
	margin-bottom: 0px;
}

.body .alert {
	margin: 10px 10px 0 10px;
}
</style>
</head>
<body>
	<jsp:include page="../../header.jsp?b=false" />
	<div class="body">
		<div class="panel panel-default">
			<c:if test="${succ == true}">
				<div class="alert alert-success alert-dismissible fade in" id="alert">重置成功，密码已发送至您的邮箱。</div>
			</c:if>
			<div class="panel-body">
				<div class="page-header">
					<h4>
						<small>请填写您的用户名及邮箱</small>
					</h4>
				</div>
				<f:form class="form-horizontal" method="post" modelAttribute="repwdParam" id="form">
					<div class="form-group form-group-sm row">
						<label class="col-sm-2 control-label text-right" for="user">用户</label>
						<div class="col-sm-9">
							<f:input path="user" class="form-control" placeholder="用户名" required="true" autofocus="true" />
							<f:errors path="user" class="text-danger" />
						</div>
					</div>
					<div class="form-group form-group-sm row">
						<label class="col-sm-2 control-label text-right" for="email">邮箱</label>
						<div class="col-sm-9">
							<f:input path="email" class="form-control" placeholder="邮箱" required="true" />
							<f:errors path="email" class="text-danger" />
						</div>
					</div>
					<div class="form-group row">
						<div class="col-sm-offset-2 col-sm-8">
							<button type="submit" class="btn btn-primary btn-sm" data-loading-text="提交中...">提 交</button>
							<a href="../" class="btn btn-link btn-sm">返 回</a>
							<f:errors class="text-danger" />
						</div>
					</div>
				</f:form>
			</div>
		</div>
	</div>
	<script type="text/javascript">
		$(function() {
			$('#form').submit(function() {
				$('#form button[data-loading-text]').button('loading');
				return true;
			});
			if ($('#alert').length != 0)
				setTimeout(function() {
					$('#alert').alert('close');
				}, 3000);
		});
	</script>
</body>
</html>